package com.weiyi.mashangzhu.Utils;

import android.content.Context;
import com.weiyi.mashangzhu.Roomer.Activity.LoginActivity;

public class AppSession {

    private Context context;
    private static AppSession mInstance;
    public static boolean isOnlyWifi = false;

    private AppSession(Context context) {
        this.context = context;
    }

    public static AppSession getInstance(Context context) {
        if (mInstance == null) {
            synchronized (AppSession.class) {
                if (mInstance == null) {
                    mInstance = new AppSession(context.getApplicationContext());
                }
            }
        }
        return mInstance;
    }

//    /**
//     * 是否第一次启动
//     */
//    public boolean isFirstEnter(Context context) {
//        return SPUtils.getBoolean(context, Constants.IS_FIRST_ENTER, true);
//    }


    /**
     * 判断用户是否登录
     */
    public boolean isLogin() {
        boolean isLogin = false;
        if (SPUtils.get(context, "isLogin", "0").equals("1")) {
            isLogin = true;
        }
        return isLogin;
    }


}





























